#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import json


dic = {"name": "xiong", "age": 100, "salary": 11111111}
"""
json_str = json.dumps(dic)

print(json_str, type(json_str))
with open("test.json", "wt", encoding="utf-8")as f :
    f.write(json_str)
"""
# 也可以简化成
with open("test.json", "wt", encoding="utf-8") as f:
    json.dump(dic, f)

